package biz.impl;

import biz.ForumsBiz;
import mapper.ForumsMapper;
import org.apache.ibatis.session.SqlSession;
import org.example.bean.ForumsInfo;

import java.util.List;

public class ForumsBizImpl implements ForumsBiz {
    private ForumsMapper fm;
    private SqlSession session;

    public ForumsBizImpl(SqlSession session) {
        this.session = session;
        fm= session.getMapper(ForumsMapper.class);
    }

    @Override
    public ForumsInfo findForumsById(int id) {
        return fm.findForumsById(id);
    }

    @Override
    public List<ForumsInfo> findAllForums() {
        return fm.findAllForums();
    }
}
